home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / Dmod / dmod_P96 / examples / P96CheckBoards.d < prev    next >
Encoding:
Text File  |  2002-10-28  |  2.8 KB  |  73 lines

  1. /***********************************************************************
  2. * This is example shows how to use p96GetRTGDataTagList and p96GetBoardDataTagList
  3. *
  4. * tabt (Sat Sep 12 23:06:28 1998)
  5. *
  6. * converted by Martin <MarK> Kuchinka, 13.9.2001
  7. ***********************************************************************/
  8.  
  9. MODULE    'picasso96','libraries/picasso96'
  10. MODULE    'utility/tagitem'
  11.  
  12. DEF    P96Base
  13.  
  14. PROC main()
  15.     IF P96Base:=OpenLibrary(P96NAME, 2)
  16.         DEFUL    NumBoards
  17.  
  18.         IF p96GetRTGDataTags(P96RD_NumberOfBoards, &NumBoards, TAG_END)=1
  19.             DEF    i
  20.  
  21.             PrintF('Looking through all boards installed for Picasso96\n')
  22.             FOR i:=0 TO NumBoards-1
  23.                 DEF    BoardName:PTR TO UB
  24.                 DEFUL    RGBFormats,
  25.                         MemorySize,
  26.                         FreeMemory,
  27.                         LargestFreeMemory,
  28.                         MemoryClock,
  29.                         MoniSwitch
  30.                 DEF    clock
  31.  
  32.                 p96GetBoardDataTags(i,
  33.                         P96BD_BoardName,         &BoardName,
  34.                         P96BD_RGBFormats,        &RGBFormats,
  35.                         P96BD_TotalMemory,       &MemorySize,
  36.                         P96BD_FreeMemory,        &FreeMemory,
  37.                         P96BD_LargestFreeMemory, &LargestFreeMemory,
  38.                         P96BD_MemoryClock,       &MemoryClock,
  39.                         P96BD_MonitorSwitch,     &MoniSwitch,
  40.                         TAG_END)
  41.                 PrintF('--------------------------------------------------\n')
  42.                 PrintF('Board %ld:                   %s\n', i, BoardName)
  43.                 PrintF('Total size of memory:     %8ld\n', MemorySize)
  44.                 PrintF('Size of free memory:      %8ld\n', FreeMemory)
  45.                 PrintF('Largest free chunk:       %8ld\n', LargestFreeMemory)
  46.                 PrintF('Monitor switch:            %s\n',   IF MoniSwitch THEN 'set' ELSE 'not set')
  47.  
  48.                 PrintF('\nThis board supports:\n')
  49.                 PrintF('\tfollowing rgb formats:\n')
  50.                 IF RGBFormats & RGBFF_NONE         THEN PrintF('\t\tPLANAR\n')
  51.                 IF RGBFormats & RGBFF_CLUT         THEN PrintF('\t\tCHUNKY\n')
  52.                 IF RGBFormats & RGBFF_R5G5B5         THEN PrintF('\t\tR5G5B5\n')
  53.                 IF RGBFormats & RGBFF_R5G5B5PC     THEN PrintF('\t\tR5G5B5PC\n')
  54.                 IF RGBFormats & RGBFF_B5G5R5PC     THEN PrintF('\t\tB5G5R5PC\n')
  55.                 IF RGBFormats & RGBFF_R5G6B5         THEN PrintF('\t\tR5G6B5\n')
  56.                 IF RGBFormats & RGBFF_R5G6B5PC     THEN PrintF('\t\tR5G6B5PC\n')
  57.                 IF RGBFormats & RGBFF_B5G6R5PC     THEN PrintF('\t\tB5G6R5PC\n')
  58.                 IF RGBFormats & RGBFF_R8G8B8         THEN PrintF('\t\tR8G8B8\n')
  59.                 IF RGBFormats & RGBFF_B8G8R8         THEN PrintF('\t\tB8G8R8\n')
  60.                 IF RGBFormats & RGBFF_A8R8G8B8     THEN PrintF('\t\tA8R8G8B8\n')
  61.                 IF RGBFormats & RGBFF_A8B8G8R8     THEN PrintF('\t\tA8B8G8R8\n')
  62.                 IF RGBFormats & RGBFF_R8G8B8A8     THEN PrintF('\t\tR8G8B8A8\n')
  63.                 IF RGBFormats & RGBFF_B8G8R8A8     THEN PrintF('\t\tB8G8R8A8\n')
  64.                 IF RGBFormats & RGBFF_Y4U2V2         THEN PrintF('\t\tY4U2V2\n')
  65.                 IF RGBFormats & RGBFF_Y4U1V1         THEN PrintF('\t\tY4U1V1\n')
  66.                 clock:=(MemoryClock+50000)/100000
  67.                 PrintF('\tmemory clock set to %ld.%1ld MHz\n',clock/10,clock\10)
  68.             ENDFOR
  69.         ENDIF
  70.         CloseLibrary(P96Base)
  71.     ENDIF
  72. ENDPROC
  73.